<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix ="spring" uri = "http://www.springframework.org/tags" %>
<%@ taglib uri="/WEB-INF/out-tabs.tld" prefix="out" %>
<head>
	<link rel="stylesheet" type="text/css" href="<c:url value="/static/css/event.css"/>"></link>
	<script type="text/javascript" src="<c:url value="/static/js/event.js"/>"></script>
	<jsp:include page="load-google-maps.jsp"></jsp:include>
</head>
<jsp:include page="categorize.jsp"></jsp:include>
<c:url value="/image/200/200/${event.picture}" var="img_src"/>
<c:url value="/map/${event.place.lat}/${event.place.lng}/" var="map_url"/>
<input type="hidden" value="${event.days[0].startDate}" id="date"/>
<input type="hidden" value="${event.id}" id="eventId"/>

<div class="form" id="event">
		<div class="form_row float_rigth">
			<div class="map">
				<a id="see-map" class="see-map modalpop" href="${map_url}">ver mapa</a>
				<img class="map-img" src="http://maps.google.com/maps/api/staticmap?center=${event.place.lat},${event.place.lng}&zoom=16&size=300x300&markers=color:0xD6E4DF|${event.place.lat},${event.place.lng}&sensor=false" alt=""></div>
			<div class="form_row description"><out:readmore value="${event.description}"></out:readmore></div>
		</div>
		<div>
			<div class="form_row title">${event.title}</div>
			<div class="form_row subtitle">${event.subtitle}</div>
		</div>
		<div class="left_container">
			<div class="form_row flyer"><img src="${img_src}"/></div>
			<div class="form_row"><span class="label"><spring:message code="label.date"/>: </span><out:dates dateRanges="${event.days}" isVirtual="${event.virtual}" timezoneId="${event.timezone}" includeTime="true" ></out:dates></div>
			<div class="form_row"><span class="label"><spring:message code="label.where"/>: </span><span>${event.place.name}</span><span>(${event.place.address})</span></div>
			<div class="form_row"><span class="label"><spring:message code="label.price"/>: </span>
			<span>
				<c:choose >
					<c:when test="${event.free}"><spring:message code="label.free"/></c:when>
					<c:otherwise>
						${event.price}
					</c:otherwise>
				</c:choose>
			</span></div>
			<div class="form_row"><span class="label"><spring:message code="label.organizer"/>: </span>${event.organizer}</div>
			<div class="form_row"><span class="label"><spring:message code="label.email"/>: </span>${event.email}</div>
			<div class="form_row"><span class="label"><spring:message code="label.website"/>: </span><a href="${event.website}" target="_new">${event.website}</a></div>
		</div>
		<div class="form_row">
			<a href="http://www.facebook.com/${event.facebook}"><img class="icon" src='<c:url value="/static/imagenes/f-icon.png"/>'></a>
			<a href="http://www.twitter.com/${event.facebook}"><img class="icon" src='<c:url value="/static/imagenes/t-icon.png"/>'></a>
			<span class="button-class" id="schedule"><spring:message code="label.schedule"/></span>
		</div>
		<c:if test="${event.free && true }"></c:if>
		<div class="button_container">
			<span class="button-class sale-button"><spring:message code="label.buy"/></span>
		</div>
</div>
<div id="schedule_box" style="display: none;">
	<select id="time_range_select">
		<c:forEach items="${event.days}" var="range" varStatus="status" >
			<option value="${status.index}"><out:date date="${range.startDate}" isVirtual="${event.virtual}" timezoneId="${event.timezone}" includeTime="true"></out:date></option>
		</c:forEach>
	</select>
		<c:forEach items="${event.days}" var="range" varStatus="status">
			<input type="hidden" value="${range.startDate}" name="startDate_${status.index}"/>
			<input type="hidden" value="${range.endDate}" name="endDate_${status.index}"/>
		</c:forEach>
	
</div>

<div id="see"> </div>


